<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台首页</title>
    <script src="asserts/plugins/jquery/jquery-3.6.0.min.js"></script>
    <script src="asserts/plugins/bootstrap/js/bootstrap.js"></script>
    <link href="asserts/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
    <title>后台主页面</title>
    <style>
        @media (min-width: 768px) {
            #left_tab {
                width: 250px;
                position: absolute;
                z-index: 1;
                height: 640px;
            }

            .mysearch {
                margin: 10px;
            }

            .page_main {
                margin-left: 255px;
            }

            .dv_content {
                width: 100%;
                height: 500px;
            }

            #left_tab {
                margin-top: 70px;
            }
        }
    </style>
    <script>
        $(function () {
            $("#zx").click(function () {
                if (confirm("确定要注销吗？")) {
                    $.ajax({
                        url: "/admin/AdminController",
                        data: {
                            type: 'logout'
                        },
                        type: 'get',
                        dataType: 'json',
                        success: function (respResult) {
                            if (respResult.status == 200) {
                                location.href = "adminLogin.html";
                            } else {
                                alert("注销失败");
                            }
                        }
                    })
                }
            })
            $("#showUser").click(function () {
                window.location.href = "userList.html";
            });
            $("#invalid").click(function () {
                window.location.href = "invalidUser.html";
            });

            $("#showGoodsType").click(function () {
                window.location.href = "showGoodsType.html";
            });
            $("#addGoodsType").click(function () {
                window.location.href = "addGoodsType.html";
            });
            $("#showGoods").click(function () {
                window.location.href = "showGoods.html";
            });
            $("#addGoods").click(function () {
                window.location.href = "addGoods.html";
            });
            $("#showOrder").click(function () {
                window.location.href = "showAllOrder.html";
            });
            $("#personalInfo").click(function () {
                window.location.href = "Message.html";
            });
            $("#showAddress").click(function () {
                window.location.href = "AddressManagement.html";
            });
        })
    </script>
</head>
<body>
<div style="width: 80%; margin-left: 10%;">
    <nav class="navbar navbar-default navbar-static-top">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#left_tab,#top_right">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="#" class="navbar-brand">网站后台管理</a>
        </div>
        <ul id="top_right" class="collapse navbar-collapse nav navbar-nav navbar-right" style="margin-right: 20px;">
            <li>
                <a href="#" id="zx">
                    <span class="glyphicon glyphicon-off"></span>注销
                </a>
            </li>
        </ul>
        <!--左侧边栏 -->
        <div id="left_tab" style="margin-top: 70px;" class="collapse navbar-default navbar-collapse">
            <ul class="nav panel-group" id="myPanel">
                <li class="panel">
                    <a href="#sub0" data-toggle="collapse" data-parent="#myPanel"> 个人信息
                        <span class="glyphicon glyphicon-triangle-bottom pull-right"></span>
                    </a>
                    <ul id="sub0" class="nav collapse panel-collapse">
                        <li>
                            <a href="#" id="personalInfo"><!-- Link to personal information page -->
                                <span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;<b>个人信息</b>
                            </a>
                        </li>
                    </ul>
                </li>
                <!--栏目-->
                <li class="panel">
                    <a href="#sub1" data-toggle="collapse" data-parent="#myPanel"> 用户管理
                        <span class="glyphicon glyphicon-triangle-bottom pull-right"></span>
                    </a>
                    <ul id="sub1" class="nav collapse panel-collapse">
                        <li>
                            <a href="#" id="showUser">
                                <span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;<b>会员管理</b>
                            </a>
                        </li>
                        <li>
                            <a href="#" id="invalid"><!-- 无效会员 -->
                                <span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;<b>无效会员管理</b>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="panel">
                    <a href="#sub3" data-toggle="collapse" data-parent="#myPanel"> 商品管理
                        <span class="glyphicon glyphicon-triangle-bottom pull-right"></span>
                    </a>
                    <ul id="sub3" class="nav panel-collapse collapse">
                        <li>
                            <a href="#" id="showGoodsType">
                                <span class="glyphicon glyphicon-record"></span>&nbsp;&nbsp;查看商品分类
                            </a>
                        </li>
                        <li>
                            <a href="#" id="addGoodsType">
                                <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;添加商品分类
                            </a>
                        </li>
                        <li>
                            <a href="#" id="showGoods">
                                <span class="glyphicon glyphicon-record"></span>&nbsp;&nbsp;查看商品
                            </a>
                        </li>
                        <li>
                            <a href="#" id="addGoods">
                                <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;添加商品
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="panel">
                    <a href="#sub4" data-toggle="collapse" data-parent="#myPanel"> 地址管理
                        <span class="glyphicon glyphicon-triangle-bottom pull-right"></span>
                    </a>
                    <ul id="sub4" class="nav collapse panel-collapse">
                        <li>
                            <a href="#" id="showAddress"><!-- Link to personal information page -->
                                <span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;<b>收货地址</b>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="panel">
                    <a href="#sub2" data-toggle="collapse" data-parent="#myPanel"> 订单管理
                        <span class="glyphicon glyphicon-triangle-bottom pull-right"></span>
                    </a>
                    <ul id="sub2" class="nav panel-collapse collapse">
                        <li>
                            <a href="#" id="showOrder">
                                <span class="glyphicon glyphicon-record"></span>&nbsp;&nbsp;查看订单
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</div>
</body>
</html>

